<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <form action="" method="post"> {% csrf_token%}
        用户名:<input type="text" name="username">
        密码:<input type="password" name="password">
        <input type="submit" value="登陆">
    </form>
    {% if login_error %}
        <h1 style="color: red">用户名或密码错误</h1>
    {% endif %}
</body>
</html>